#!/bin/bash

if [ ! -z "$JAVA_HOME" ]
then
  JAVA=${JAVA_HOME}/bin/java
else
  JAVA=java
fi

PROGRAMDIR=$(cd `dirname $0` ; pwd)
VERSION=@VERSION@
PACKAGE=@PACKAGE@
FILE=${PACKAGE}-${VERSION}-cli.jar
if [ ! -f "${PROGRAMDIR}/${FILE}" ]
then
  PROGRAMDIR=${PROGRAMDIR}/../lib/
fi

${JAVA} -jar ${PROGRAMDIR}/${FILE} "$@"
